<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Store/log',array('type'=>$type))}">进出库记录</a></li>
		</ul>
     <div>
     <form  class="well form-search" action="{:url('Store/log',array('type'=>$type))}" method="post">
     <label>操作：
     	<select name="from" class="form-control">
			<option value="all" >——请选择——</option>
            <option value='out'<if condition="'out' eq $from">selected</if>>出库</option>
            <option value="add" <if condition="'add' eq $from">selected</if>>入库</option>
            </foreach>
        </select>   	
     </label>
		 <label>{:lang('库房')}:
			 <select class="form-control" name="room">
				 <option value="" >——请选择——</option>
				 <volist name="rooms" id="vo">
					 <option value="{$vo.id}" <if condition="$room eq $vo.id">selected</if>>{$vo.room_name}</option>
				 </volist>
			 </select></label>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Store/log',array('type'=>$type))}">清空</a>
        </form>
        </div>
		<form action="{:url('Rbac/listorders')}" method="post">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                        <th width="3%">ID</th>
						<th width="12%">{:lang('GOODS_NAME')}</th>
                        <th width="7%">{:lang('STOREROOM')}</th>
                        <th width="7%">{:lang('NUM')}</th>
						<th width="12%">{:lang('出库/入库')}</th>
                        <th width="10%">{:lang('OPERATOR')}</th>
						<th width="15%">{:lang('OPERATE_TIME')}</th>
						<th width="10%">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="results" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.goods_name}</td>
                        <td>{$vo.room_name}</td>
                        <td>{$vo['num']}</td>
						<if condition="$vo['from'] eq 'add'">
							<td style="color: red">入库</td>
							<else />
							<td style="color: red">出库</td>
						</if>
						<td>{$vo['user_login']}</td>
						<td><php>echo date('Y-m-d H:i:s', $vo['add_time'])</php></td>
						<td>
							<a href="{:url('Store/delete_log',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>

	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
	<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
    <script type="text/javascript">
		</script>
</body>
</html>